package com.masterclient.app.modules.coupon.adapter;

import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.masterclient.app.R;
import com.masterclient.app.modules.coupon.beans.RedPackedDetailsBean;

/**
 * @auther hjian
 * @date 2020/1/2.
 */
public class RewardInviteAdapter extends BaseQuickAdapter<RedPackedDetailsBean .ShMissionBean, BaseViewHolder> {
    public RewardInviteAdapter() {
        super(R.layout.item_reward_invite);
    }

    @Override
    protected void convert(BaseViewHolder helper, RedPackedDetailsBean .ShMissionBean item) {
        helper.setText(R.id.item_invite_firendname,"你的好友："+item.getSh_nick_name())
                .setText(R.id.item_invite_bindtime, "绑定时间："+item.getSh_invite_time())
                .setText(R.id.item_invite_statereason, TextUtils.isEmpty(item.getSh_reason())?"":
                        ("未达成原因："+item.getSh_reason()))
                .setGone(R.id.item_invite_firendstate, "0".equals(item.getSh_pass()))
                .setGone(R.id.item_invite_statereason, "0".equals(item.getSh_pass()));
    }
}
